﻿using StockholmsStad.Runtime.Serialization.DataContract;

namespace StockholmsStad.Data.ContractFactory
{
    /// <summary>
    /// Konvertering befintligt dataobjekt till kontraktsobjekt
    /// </summary>
    internal class PropertiesFactory
    {
        public ParVisProperties CreateContractObject(Entity.ParVisProperties entity)
        {
            var parVisProperties = new ParVisProperties
                                       {
                                                        ImpedimentDocValidMonths = entity.ImpedimentDocValidMonths,
                                                        IndividualImpedimentDocReminderAtDays =
                                                            entity.IndividualImpedimentDocReminderAtDays,
                                                        IndividualImpedimentDocRemoveBookingAtDays =
                                                            entity.IndividualImpedimentDocRemoveBookingAtDays,
                                                        IndividualPreliminaryBookingEarliestDays =
                                                            entity.IndividualPreliminaryBookingEarliestDays,
                                                        ReminderOfDocumentsIndividualBookingDays = 
                                                            entity.ReminderOfDocumentsIndividualBookingDays,
                                                            ReminderOfServiceOrdinaryBookingDays = 
                                                            entity.ReminderOfServiceOrdinaryBookingDays,
                                                        OrdinaryImpedimentDocReminderAtDays =
                                                            entity.OrdinaryImpedimentDocReminderAtDays,
                                                        OrdinaryImpedimentDocRemoveBookingAtDays =
                                                            entity.OrdinaryImpedimentDocRemoveBookingAtDays,
                                                        OrdinaryPreliminaryBookingEarliestDays =
                                                            entity.OrdinaryPreliminaryBookingEarliestDays,
                                                        ApplicationChangeDateIndividualBookingDays =
                                                            entity.ApplicationChangeDateIndividualBookingDays,
                                                        ApplicationChangeDateOrdinaryBookingDays =
                                                            entity.ApplicationChangeDateOrdinaryBookingDays,
                                                    };
            return parVisProperties;
        }
    }
}